function setSelect(name,value){
	var cookie_value = GetCookie(name);
	
	var values = new Array();
	
	var new_value="";
	var add_flg=1;
	
	if(cookie_value==false){
		SetValue(name,value);
		//alert(value);
	}
	else{
		values = cookie_value.split(",");
		
		for(i=0;i<values.length;i++){
			if(values[i]!=value){
				if(i==0){
					new_value += values[i];
				}
				else{
					new_value += ","+values[i];
				}
			}
			else{
				add_flg=0;
			}
		}

		if(add_flg){
			new_value += ","+value;
		}

		SetValue(name,new_value);

	}

}

function SetValue(name, value){
        var argv        = SetValue.arguments;
        var argc        = SetValue.arguments.length;
        var expires     = (argc > 2) ? argv[2] : null;
        var path        = (argc > 3) ? argv[3] : null;
        var domain      = (argc > 4) ? argv[4] : null;
        var secure      = (argc > 5) ? argv[5] : false;
		//alert(name+";"+escape(value)+";"+expires+";"+path+";"+domain+";"+secure);
        
                

        document.cookie = name + "=" + escape(value)
                + ((expires     == null) ? "" : ("; expires="   + expires))
                + ((path        == null) ? ";path=/" : ("; path="    + escape(path)));
                + ((domain      == null) ? "" : ("; domain="  + escape(domain)))
                + ((secure      == true) ? "; secure" : "");
		
//		alert(document.cookie);

}

function GetCookie(name){
        var arg  = name + "=";
        //alert(arg);
        var alen = arg.length;
        var clen = document.cookie.length;
        var i = 0;

        while (i < clen){
                var j = i + alen;
                if (document.cookie.substring(i, j) == arg) return GetCookieValue (j);
                i = document.cookie.indexOf(" ", i) + 1;
                if (i == 0) break;
        }
        return false;
}

function GetCookieValue(offset){
        var endstr = document.cookie.indexOf(";", offset);
        if (endstr == -1) endstr = document.cookie.length;
        return unescape(document.cookie.substring(offset, endstr));
}

function checkcookie(url){
	var cookie_value = GetCookie('job');
	if(cookie_value==false){
		alert('求人を選択して下さい');
	}else{
		location.href=url;
	}
}

function setDisable(arg1,arg2){
   var check=document.getElementById(arg1);
   if(check.checked){
      document.getElementById(arg2).disabled=false;
   }else{
      document.getElementById(arg2).value='';
      document.getElementById(arg2).disabled=true;
      return;
   }
}